package com.zfx.controller;

import com.zfx.client.ITemplateClient;
import com.zfx.util.JsonObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

/**
 * @description:
 * @author: zfx
 * @version: 1.0
 * @time: 2020-05-09 21:01
 * <p>
 * 修改历史：
 * 修改日期      修改人员    版本    内容
 * 2020-05-09   zfx       1.0
 */
@RestController
@RequestMapping("/templateClient")
public class TemplateController {

    @Autowired
    private ITemplateClient templateClient;

    @RequestMapping("/findById")
    public JsonObject findById(@RequestParam(name = "modeId") int modeId) {
        return templateClient.findById(modeId);
    }


    @RequestMapping("/clientList")
    public JsonObject getList(@RequestBody String jsonData) throws IOException {
        return templateClient.getList(jsonData);
    }
}
